#ifndef CHASSIS_H
#define CHASSIS_H

#include "tire.h"
#include <iostream>
using namespace std;
#include <string.h>
#include<fstream>

// 底盘信息
class Chassis
{
public:

    void setId(string _id);
    void setModel(string _model);
    void setWheelbase(int w);
    void setTrack_width(int t);
    void setMinimum_ground_clearance(int m_g);
    void setMinimum_turning_radius(int m_t);
    void setDriving_form(string form);
    void setMaximum_stroke(int max);
    void setT1(Tire _t1);
    void setT2(Tire _t2);
    void setT3(Tire _t3);
    void setT4(Tire _t4);
    void print ();
    void save (string path);

    void update(int message){
        if(message==1){
            cout<<"后退"<<endl;
        }else if(message==2){
            cout<<"左转"<<endl;
        }else if(message==3){
            cout<<"右转"<<endl;
        }
    }


private:
    string  id;
    string  model="SCOUT MINI";
    int   wheelbase=451;
    int   track_width=490;
    int   minimum_ground_clearance=115;
    int   minimum_turning_radius=0;
    string  driving_form="四轮四驱";
    int   maximum_stroke=10;
    struct Tire t1;
    struct Tire t2;
    struct Tire t3;
    struct Tire t4;
};

#endif // CHASSIS_H
